<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">
    <body>
        <ui:composition template="../templates/default3.xhtml">      
            <ui:define name="content">
                <h:form id="updateLead" binding="#{leadManagerBean.loadSearchLead}">
 
                    <p:panel header="Select lead" id="selectlead">
                        <p:dataTable id="lead" var="lead" value="#{leadManagerBean.leads}" selectionMode="single" 
                                     selection="#{leadManagerBean.lead}" update="updateLead"  paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" >
                            <p:column filterBy="#{lead.firstName}" headerText="First Name" filterMatchMode="contains">  
                                <h:outputText value="#{lead.firstName}" />  
                            </p:column> 
                            <p:column filterBy="#{lead.company}" headerText="Company" filterMatchMode="contains">  
                                <h:outputText value="#{lead.company}" />  
                            </p:column> 
                            <p:column filterBy="#{lead.title}" headerText="Designation" filterMatchMode="contains">  
                                <h:outputText value="#{lead.title}" />  
                            </p:column> 
                            <p:column filterBy="#{lead.status}" headerText="Status" filterMatchMode="contains">  
                                <h:outputText value="#{lead.status}" />  
                            </p:column> 
                        </p:dataTable>
                        <table class="table-submit">
                            <tr>
                                <td align="center">
                                   <p:commandButton value="Select Lead" actionListener="#{leadManagerBean.edit}" ajax="true"/>  
                                </td>
                            </tr>
                        </table>
                    </p:panel>
                </h:form>
            </ui:define>        
        </ui:composition>
    </body>
</html>